#ifndef _HANDLER_H_
#define _HANDLER_H_

#include "thread.h"
#include "buffered_reader.h"

class Server;
class RawCommand;

class ClientHandler: public Thread
{
public:
    ClientHandler(int sock);
    virtual ~ClientHandler();
    virtual void run();
    virtual void stop();

	bool getRawCommand(RawCommand& rc);
	void handleRawCommand(RawCommand& rc);
private:
    int m_sock;
    BufferedReader m_reader;
};

#endif
